home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
4thcmp21.zip
/
DOS1.4TH
< prev
next >
Wrap
Text File
|
1993-06-23
|
1KB
|
42 lines
\ DOSINT FILE INTERFACE 08:52 12/08/86
\ Code Copyright (c) 1986 by Thomas Almy. All rights reserved.
\ Permission is granted to registered users of ForthCMP to sell or distribute
\ computer programs incorporating the compiled contents of this file.
\ This file is intended to behave like UR/FORTH's "DOSINT" interface.
\ This file should be included before the application, and the
\ file "DOS2" should be included just before "FORTHLIB".
\ Enjoy!
\ Tom
10 DECIMAL
H: HCB DSEG CREATE HERE 84 ALLOT DUP 84 0 FILL -1 SWAP ! ;
DSEG
0 CONSTANT stdin
1 CONSTANT stdout
2 CONSTANT stderr
3 CONSTANT stdaux
4 CONSTANT stdprn
0 CONSTANT O_RD
1 CONSTANT O_WR
2 CONSTANT O_RDWR
VARIABLE errno
2 1 IN/OUT NEED FREN
1 0 IN/OUT NEED .FNAME
1 1 IN/OUT NEED FCHDIR
1 1 IN/OUT NEED FCLOSE
1 1 IN/OUT NEED FDEL
2 1 IN/OUT NEED FMAKE
1 1 IN/OUT NEED FMKDIR
1 1 IN/OUT NEED FRMDIR
1 1 IN/OUT NEED HCB>N
1 1 IN/OUT NEED HCB>H
2 0 IN/OUT NEED NAME>HCB
1 1 IN/OUT NEED ASCIIZ
16 = #IF HEX #THEN